package com.imb.provider.config;

import com.imb.common.web.redis.RedisCache;
import com.imb.security.JwtAuthenticationTokenFilter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author xzhi
 * @desc 自定义鉴权
 * @date 2024-09-29
 */
@Component
@Slf4j
public class CustomAuthenticationFilter extends JwtAuthenticationTokenFilter {

    @Autowired
    private RedisCache redisCache;

    @Override
    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
//        super.doFilterInternal(request, response, filterChain);
        log.info("自定义provider鉴权策略-------------------------");
        filterChain.doFilter(request, response);
    }

}
